package woaini.fenger.core.bot.event.message;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import woaini.fenger.core.bot.enums.GroupMessageSubType;
import woaini.fenger.core.bot.event.BaseEvent;
import woaini.fenger.core.bot.id.ID;
import woaini.fenger.core.bot.event.MessageAnonymous;
import woaini.fenger.core.bot.event.Messages;

/**
 * 群发消息
 *
 * @see GroupMessageEvent
 * @author yefeng {@code @Date} 2023-05-16 16:50:39
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class GroupMessageEvent extends BaseEvent {
  /**
   * @see String 消息类型 group 群里消息
   */
  @JSONField(name = "message_type")
  private String messageType = "group";

  /**
   * @see GroupMessageSubType 消息类型 子消息类型 正常消息是 normal，匿名消息是 anonymous，系统提示（如「管理员已禁止群内匿名聊天」）是 notice
   */
  @JSONField(name = "sub_type")
  private GroupMessageSubType subType;

  /**
   * @see String 消息ID
   */
  @JSONField(name = "message_id")
  private String messageId;

  /**
   * @see String 发送者id
   */
  @JSONField(name = "user_id")
  private ID userId;

  @JSONField(name = "group_id")
  private ID groupId;

  /**
   * @see Messages 消息短
   */
  private Messages message;

  /**
   * @see String 原始消息内容
   */
  @JSONField(name = "raw_message")
  private String rawMessage;

  /**
   * @see MessageAnonymous 匿名
   */
  private MessageAnonymous anonymous;


}
